{% extends "services_base.html" %}

{% block page_content %}
<div>
<div class="col-md-4 input-host">
    <div class="form-group">
        <label>HostName</label>
        <input type="text" id="host_name_key" name="hostname_key" class="form-control" value="{{ host.host_name}}" readonly />
    </div>
    <div class="form-group">
        <label>IP</label>
        <input type="text" id="ip" name="ip" class="form-control" value="{{host.ip}}"/>
    </div>

    <div class="form-group">
        <label>Port</label>
        <input type="text" id="port" name="port" class="form-control" value="{{ host.port}}"/>
    </div>
    <div class="checkbox">
        <label>
            {% if host.server_lvm %}
            <input id="check_enable_lvm" type="checkbox" value="{{ host.server_lvm }}" checked="checked">Server Enable LVM
            {% else %}
            <input id="check_enable_lvm" type="checkbox">Server Enable LVM
            {% endif %}
        </label>
    </div>
</div>
<div class="col-md-4 input-host">
    <label>Installed Services</label>
    <textarea id="services_text" class="form-control">{%for s,v in host.service.items %}{{ s }},{% endfor %}</textarea>
    <div id="installed_service_info" style="display: none">
        <i class="fa fa-info-circle"></i><span>&nbsp;可以安装的服务有:
        {% for service in default_services %}
            {{ service}},
        {% endfor %}
        <br>注: 添加服务时用逗号作分隔。</span>
    </div>
</div>

    <button id="update_host" class="btn btn-primary" type="button" style="margin-left: 10px;">&nbsp;Update&nbsp;</button>
</div>
{% endblock page_content %}